import '@/untils/http.js'

// 登录
export function ResLogin(data) {
	return uni.$http.post('/addons/cleaning/user/login', data)
}
// 验证码
export function ResSend(data) {
	return uni.$http.post('/addons/common/sms/send', data) //发送
}
export function ResCheck(data) {
	return uni.$http.post('/addons/common/sms/check', data) //检测
}
// 首页
export function ResRotation() {
	return uni.$http.post('/addons/cleaning/index/rotation')
}
export function ResSupport() {
	return uni.$http.post('/addons/cleaning/index/support')
}
export function ResProductType() {
	return uni.$http.post('/addons/cleaning/index/productType')
}
export function ResNewCoupon() {
	return uni.$http.post('/addons/cleaning/index/newCoupon')
}
export function ResHot() {
	return uni.$http.post('/addons/cleaning/index/hot')
}
export function ResTechnician() {
	return uni.$http.post('/addons/cleaning/index/technician')
}
export function ResProduct() {
	return uni.$http.post('/addons/cleaning/index/product')
}
export function Resarea() {
	return uni.$http.post('/addons/cleaning/index/area')
}
export function ResSearch(data) {
	return uni.$http.post('/addons/cleaning/index/search', data) // 搜索
}
export function ResHotSearch() {
	return uni.$http.post('/addons/cleaning/index/hotSearch') // 热门搜索列表
}

// 服务
export function ResProductTy(id) {
	return uni.$http.post('/addons/cleaning/index/productTypes', id)
}
export function ResProductList(id) {
	return uni.$http.post('/addons/cleaning/product/list', id)
}

// 服务详情
export function ResDetail(id) {
	return uni.$http.post('/addons/cleaning/product/detail', id)
}

export function ResPackage(id) {
	return uni.$http.post('/addons/cleaning/product/package', id)
}
export function ResCommentList(id) {
	return uni.$http.post('/addons/cleaning/product/commentList', id)
}

// 订单
export function ResOrderList(data) {
	return uni.$http.post('/addons/cleaning/order/orderList', data)
}
export function ResOrderDe(id) {
	return uni.$http.post('/addons/cleaning/order/detail', id)
}
export function ResOrdertime() {
	return uni.$http.post('/addons/cleaning/order/times') // 上门时间
}
export function ResBefore(data) {
	return uni.$http.post('/addons/cleaning/order/before', data) // 订单预申请
}
export function ResCreate(data) {
	return uni.$http.post('/addons/cleaning/order/create', data) // 创建订单
}
export function ResPay(data) {
	return uni.$http.post('/addons/cleaning/order/pay', data) // 发起支付
}
export function ResRefundList() {
	return uni.$http.post('/addons/cleaning/order/refundList') // 退款记录
}
export function ResPlaintList() {
	return uni.$http.post('/addons/cleaning/order/complaintList') // 投诉记录
}
export function ComplaintDetail(id) {
	return uni.$http.post('/addons/cleaning/order/complaint_detail', id) // 投诉详情
}
export function ResComplaint(data) {
	return uni.$http.post('/addons/cleaning/order/complaint', data) // 发起投诉 
}
export function ResCanplaint(id) {
	return uni.$http.post('/addons/cleaning/order/cancellation_ts', id) // 取消投诉
}
export function ResComment(data) {
	return uni.$http.post('/addons/cleaning/order/comment', data) // 发布评价
}
export function ResRefund(data) {
	return uni.$http.post('/addons/cleaning/order/refund', data) // 退款申请
}
export function RefundDetail(id) {
	return uni.$http.post('/addons/cleaning/order/refund_detail', id) // 退款详情
}
export function ResCancellation(id) {
	return uni.$http.post('/addons/cleaning/order/cancellation', id) // 取消退款
}
export function ResTags() {
	return uni.$http.post('/addons/cleaning/order/getTags') // 评价标签
}

// 技师
export function ResCleanerList() {
	return uni.$http.post('/addons/cleaning/technician/list')
}
export function ResCleaner(id) {
	return uni.$http.post('/addons/cleaning/technician/detail', id)
}
export function ResCollection(id) {
	return uni.$http.post('/addons/cleaning/user/collection', id) // 收藏技师
}
export function ResOffCleaner(id) {
	return uni.$http.post('/addons/cleaning/user/cancelCollection', id)
}
export function ResSkill() {
	return uni.$http.post('/addons/cleaning/technician/skill') // 技师技能
}
export function ResCity() {
	return uni.$http.post('/addons/cleaning/index/sell_city') // 城市列表
}
export function ResRecruit(data) {
	return uni.$http.post('/addons/cleaning/technician/recruit', data) // 技师招募
}

// 用户相关
export function ResColleList() {
	return uni.$http.post('/addons/cleaning/user/collectionList') //我的收藏
}
export function ResAddressList() {
	return uni.$http.post('/addons/cleaning/address/list') //地址列表
}
export function ResAddress(data) {
	return uni.$http.post('/addons/cleaning/address/add', data) //添加地址
}
export function ResChangeAddress(data) {
	return uni.$http.post('/addons/cleaning/address/exec', data) // 修改地址
}
export function ResDelAddress(id) {
	return uni.$http.post('/addons/cleaning/address/del', id) // 删除地址
}
export function ResUserInfo() {
	return uni.$http.post('/addons/cleaning/user/userInfo') // 获取用户信息
}
export function ResProfile(data) {
	return uni.$http.post('/addons/cleaning/user/profile', data) // 修改用户信息
}
export function ResLogoff() {
	return uni.$http.post('/addons/cleaning/user/logoff') // 注销账户
}
export function ResUserpact(data) {
	return uni.$http.post('/addons/cleaning/user/pact', data) // 获取协议
}
export function ResRemind(data) {
	return uni.$http.post('/addons/sp/user/signRemind', data) // 修改配置
}
export function ResBinding(data) {
	return uni.$http.post('/addons/cleaning/user/binding', data) // 绑定微信
}
export function ResRemove() {
	return uni.$http.post('/addons/cleaning/user/remove') // 解绑微信
}


// 优惠券
export function ResCouponList() {
	return uni.$http.post('/addons/cleaning/coupon/list') // 我的优惠
}
export function ResDraw(id) {
	return uni.$http.post('/addons/cleaning/coupon/draw', id) // 领取优惠
}
export function ResDrawAll(id) {
	return uni.$http.post('/addons/cleaning/coupon/drawAll', id) // 一键领取所有优惠
}
export function ResUsable(data) {
	return uni.$http.post('/addons/cleaning/coupon/usable', data) // 获取可用优惠
}

// 通用接口
// export function ResUpload(data) {
// 	return uni.$http.post('/api/common/upload', data) // 文件上传
// } 
export function ResCommon() {
	return uni.$http.post('/addons/cleaning/common/common') // 公共参数
}
